
import React, {Component} from 'react'

export default class list extends Component{
    constructor(props){
        super(props)
    }

    render(){
        let {info,index} = this.props;
        console.log(this.props.del)
        let fun = ()=>{
            return (
                <div>
                    <li>{info}<button onClick={this.props.del.bind(this,index)}>点我删除</button></li>
                </div>
            )
        }
        return(
            <ul>
                {fun()}
            </ul>
        )
    }
}